<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <link rel="stylesheet" type="text/css" href="../../css/weui.min.css" />
    <link rel="stylesheet" type="text/css" href="../../css/jquery-weui.min.css" />
    <link rel="stylesheet" type="text/css" href="../../css/index.css" />
    <link rel="stylesheet" type="text/css" href="../../css/order.css" />
    <title>出库磅单</title>
    <script src="../../js/jquery-2.1.4.js" type="text/javascript" charset="utf-8"></script>
    <script src="../../js/jquery-weui.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="../../js/baseConfig.js" type="text/javascript" charset="utf-8"></script>
    <script src=" http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
</head>

<body>
    <div class="imgWarp" style="margin-top: 0;">

    </div>
</body>
<script type="text/javascript">
    $(document).ready(function() {
        baseConfig.historyBack()
        $.ajax({
            type: "get",
            url: baseConfig.localHttp + "weChatApi/fgclient/getOutPoundList",
            async: false,
            headers: {
                'Content-Type': 'application/x-www-form-urlencoded'
            },
            data: {
                orderNo: baseConfig.GetQueryString("orderNo")
            },
            success: function(data) {
                console.log(data)
                var status = baseConfig.GetQueryString("status")
                if (data.code == 100) {
                    if (data.content.length == 0) {
                        $.toast("暂无过磅单数据", "cancel");
                    } else {
                        var $li = ""

                        for (var i = 0; i < data.content.length; i++) {
                            $li += "<img src=" + baseConfig.imglocalHttp + data.content[i] + ">"
                        }
                        $(".imgWarp").append($li)
                        var imgsurl = [];
                        var nowurl = '';
                        var imgObj = $(".imgWarp img");
                        for (var i = 0; i < imgObj.length; i++) {
                            imgsurl[i] = imgObj[i].src;
                            imgObj[i].onclick = function() {
                                nowurl = this.src;
                                wx.previewImage({
                                    current: nowurl,
                                    urls: imgsurl
                                });
                            }
                        }
                    }
                } else {
                    $.toptip(data.content, 1200, 'error')
                }
            },
            error: function() {
                $.toast("请求失败", "cancel");
            }
        })
    })
</script>

</html>